/**
 * 文件名：WmDeliveryTicketLineRepoImpl.java
 * 版权：Copyright Lightkit All Rights Reserved.
 * 描述：
 */
package com.lightkits.wms.domain.arrivalnotice.repo.impl;

import com.lightkits.common.db.entity.WmDeliveryTicketLine;
import com.lightkits.wms.domain.arrivalnotice.repo.WmDeliveryTicketLineDBService;
import com.lightkits.wms.domain.arrivalnotice.repo.WmDeliveryTicketLineRepo;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author jie.ao@hand-china.com
 * @create 2019-07-11 14:08
 * @desc
 **/
@Repository
public class WmDeliveryTicketLineRepoImpl implements WmDeliveryTicketLineRepo {
    private final WmDeliveryTicketLineDBService service;
    public WmDeliveryTicketLineRepoImpl(WmDeliveryTicketLineDBService service) {
        this.service = service;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateBatch(List<WmDeliveryTicketLine> modifyList) {
        service.updateAllColumnBatchById(modifyList);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void update(WmDeliveryTicketLine wmDeliveryTicketLine) {
        service.updateById(wmDeliveryTicketLine);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insert(WmDeliveryTicketLine wmDeliveryTicketLine) {
        service.insert(wmDeliveryTicketLine);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insertBatch(List<WmDeliveryTicketLine> insertList) {
        service.insertBatch(insertList);
    }
}
